#define _CRT_SECURE_NO_WARNINGS
#include  <stdio.h>
int fib(int x)
{
	int a = 1;
	int b = 1;
	int c = 1;
	while (x > 2)
	{
		a = b;
		b = c;
		c = a + b;
		x--;
	}
	return c;
}
int main()
{
	int i = 0;
	scanf("%d", &i);
	printf("%d", fib(i));
}